package zust.javaee.enums.player;

/**
 * Created by liy on 2017/1/7.
 */
public enum PlayerTypeEnum {

    SUPER((short)-1, "超管"),
    CORPORATIONHEAD((short)0, "社团负责人"),
    CORPORATIONRESPONSE((short)1, "社团管理员"),
    CORPORATIONMEMBER((short)2, "社团成员"),
    REGISTER((short)3, "注册用户");

    private Short type;

    private String info;

    public static PlayerTypeEnum stateOf(int index) {
        for (PlayerTypeEnum e : values()) {
            if (e.getType() == index) {
                return e;
            }
        }
        return null;
    }

    PlayerTypeEnum(Short type, String info) {
        this.type = type;
        this.info = info;
    }

    public Short getType() {
        return type;
    }

    public void setType(Short type) {
        this.type = type;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }
}
